Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugin-auto-nav-sidebar): support index as the dir click section and custom-link context #1572

Merged
merged 8 commits into from
Nov 13, 2024

Conversation

SoonIter
Copy link
Member

@SoonIter SoonIter commented Nov 13, 2024

Summary

close #1568

index convention

  1. same name file, "/api" and "/api.md", same behavior as before
  2. index file, "/api" and "/api/index.md"
  3. _meta.json has "index", same behavior as before

close #1571

some cases

dir: index is in dir sidebar
child: index sidebar is in child list

├── doc
│   ├── _meta.json
│   ├── guide
│   │   ├── _meta.json
│   │   ├── index-in-meta    // -> child
│   │   │   ├── _meta.json // ["index"]
│   │   │   └── index.md
│   │   ├── index-md-convention // -> dir
│   │   │   ├── _meta.json // []
│   │   │   └── index.md
│   │   ├── index-mdx-convention // -> dir
│   │   │   ├── _meta.json //  []
│   │   │   └── index.mdx
│   │   ├── index.md
│   │   ├── same-name // -> dir
│   │   │   └── _meta.json
│   │   ├── same-name.mdx
│   │   ├── single-md  // -> child
│   │   │   └── index.md
│   │   └── single-mdx // -> child
│   │       └── index.mdx
│   └── index.md
├── package.json
├── rspress.config.ts
└── tsconfig.json

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit 1418e6b
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/673482bec677a000080b6d59
😎 Deploy Preview https://deploy-preview-1572--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 87 (🔴 down 3 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@SoonIter SoonIter changed the title feat: support index as the dir click section feat(plugin-auto-nav-sidebar): support index as the dir click section and custom-link context Nov 13, 2024
@SoonIter SoonIter merged commit 03806e8 into main Nov 13, 2024
7 checks passed
@SoonIter SoonIter deleted the index branch November 13, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Context doesn't work for custom-link [Feature]: Support "index" convention
2 participants